//
//  Sequence+Extension.swift
//  PigManager
//
//  Created by 邱仙凯 on 2020/9/23.
//  Copyright © 2020 Much. All rights reserved.
//

import UIKit

extension Sequence {
    // 传入一个Bool,把符合条件的分为一组，不符合条件的分为另外一组
    func anotherPartitionBy(_ fu: (Self.Iterator.Element) -> Bool) -> ([Self.Iterator.Element], [Self.Iterator.Element]) {
        return (self.filter(fu), self.filter({!fu($0)}))
    }
}
